Minitest
In the steps below, we'll start with a Ruby project that has an existing minitest test suite, and we'll add JUnit XML as an additional output format for the test suite. In each step, we'll show the Git diff for the change that we're making.
- Add - minitest-cias a dependency.- bundle add minitest-ci- Verify that your - Gemfilefile includes the new dependency:- ruby '2.7.4'
 gem 'minitest'
 +gem 'minitest-ci'
 gem 'rake'
- Require - minitest/ciin your tests. Find where you're currently requiring- minitest(such as- test/test_helper.rbin the example below) and update it to require- minitest/cias well.- require 'minitest/autorun'
 +require 'minitest/ci'
- minitest-ciwrites the JUnit reports to a- test/reportsdirectory at the root of your project. Update your- .gitignorefile so that the reports don't get accidentally checked into the repository.- /.bundle
 +/test/reports
- Commit these changes to your repository. - git commit -am "Generate JUnit XML test reports with minitest-ci"- The final result of these changes should resemble commit ff08dc8 in the buildpulse-example-ruby-minitest repository.